package com.lushu.chapitre1.net.services
{
	import com.lushu.log.Logger;
	import com.lushu.net.php.RemotingService;
	import com.lushu.net.php.messages.ErrorMessage;
import com.sfdk.net.php.messages.ErrorMessage;

import flash.net.Responder;
	
	import flexunit.framework.Assert;
	
	import org.flexunit.async.Async;
	
	public class UserFarmServiceTest extends BaseServiceTest
	{
		[BeforeClass]
		public static function setUpBeforeClass():void
		{
			_remotingService = new RemotingService("http://localhost:8400/Chapitre1_DataService/messagebroker/amf");
			_logger = new Logger();
		}
		
		[AfterClass]
		public static function tearDownAfterClass():void
		{
			_remotingService = null;
			_logger = null;
		}
		
		[Test]
		public function testAddModule():void
		{
//			Assert.fail("Test method Not yet implemented");
		}
		
		[Test(async,timeout="3000")]
		public function testGetFarm():void
		{
//			var userID:int = 1;
//			var serviceResponder:Responder = Async.asyncNativeResponder(this, onGetFarmResult, onGetFarmFault, 30000, null, onDefaultTimeout);
//			UserFarmService.getFarm(serviceResponder, userID);
		}
		
		private function onGetFarmResult(data:*, data2:* = null, data3:* = null):void
		{
//			Assert.assertNotNull(data, "UserFarmService.getFarm :: The returned data is null");
		}
		
		private function onGetFarmFault(data:ErrorMessage):void
		{
//			Assert.fail("UserFarmService.getFarm :: Error while retrieving the farm data " + data.faultCode + " " + data.faultString);
        }
    }
}